package com.ming.luckyDemo.mapper;

import com.ming.luckyDemo.pojo.DO.BetBillDO;
import com.ming.luckyDemo.pojo.DO.HistoryLuckyDO;
import com.ming.luckyDemo.pojo.DO.UserInfoDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Mapper
@Repository
public interface QueryLuckyMapper {
    /**
     * 总和：大、小、单、双double
     * @param numbers
     * @return
     */
    double queryZBig(@Param("numbers")int numbers);
    double queryZSmall(@Param("numbers")int numbers);
    double queryZOdd(@Param("numbers")int numbers);
    double queryZEven(@Param("numbers")int numbers);

    /**
     * 数字一：大、小、单、双
     * @param numbers
     * @return
     */
    double queryBig1(@Param("numbers")int numbers);
    double querySmall1(@Param("numbers")int numbers);
    double queryOdd1(@Param("numbers")int numbers);
    double queryeven1(@Param("numbers")int numbers);

    /**
     * 数字二：大、小、单、双
     * @param numbers
     * @return
     */
    double queryBig2(@Param("numbers")int numbers);
    double querySmall2(@Param("numbers")int numbers);
    double queryOdd2(@Param("numbers")int numbers);
    double queryeven2(@Param("numbers")int numbers);

    /**
     * 数字三：大、小、单、双
     * @param numbers
     * @return
     */
    double queryBig3(@Param("numbers")int numbers);
    double querySmall3(@Param("numbers")int numbers);
    double queryOdd3(@Param("numbers")int numbers);
    double queryeven3(@Param("numbers")int numbers);

    UserInfoDO queryByName(String cookieName);

    void saveLucky(@Param("numbers") int numbers,@Param("lucky") String lucky,@Param("currentDate")String current_date);

    List<BetBillDO> selectBetByName(@Param("username") String username, @Param("numbers") int numbers);

    HistoryLuckyDO selectLuckyByNumbers(@Param("numbers") int numbers);

    double selectByInfo(@Param("username") String username);

    void updateBalance(@Param("balance") double balance,@Param("username") String username);

    List<String> selectUserName();
}
